//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/.
//

simple Sensor
{
    parameters:
        int xpos;
        int ypos;
        int trRange;
         //double energy;
        @display("p=$xpos,$ypos;i=misc/node");
    gates:
        input in[];  // declare in[] and out[] to be vector gates
        output out[];
}

network WSN
{
    parameters:
        int numNodes;
        int trRange;
        @display("bgb=80,80");
        int limit = 1;

    submodules:
        tic[numNodes]: Sensor {
            parameters:
                trRange = 50;
                xpos = intuniform(10, 500);
                ypos = intuniform(10, 500);
                @display("is=vs");
        }
    connections allowunconnected:

}
